{% extends "base_generic.html" %}

{% block content %}
  <h1>{% if view.action == 'create' %}创建新书{% else %}编辑书籍{% endif %}</h1>
  
  <form method="post">
    {% csrf_token %}
    {{ form.as_p }}  <!-- 自动渲染表单字段 -->
    <button type="submit" class="btn btn-primary">保存</button>
  </form>
{% endblock %}